const Router = require("koa-router")
const c2k = require('koa2-connect')
const proxy = require('http-proxy-middleware')

/**
 * 路由对象
 * @type {Router}
 */
const router = new Router({
  prefix: '/api/econtract'
})

router.all("*", c2k(proxy({
  target: 'https://openadmintest92.aiyuangong.com',
  changeOrigin: true,
  ws: true
})))

module.exports = router
